﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
using DataAccess.Classes;

namespace Webmau.Admin
{
    public partial class PhongTro : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                PopulateControls();
        }

        private void PopulateControls()
        {
            int howManyPages = 0;
            string page = Request.QueryString["Page"] ?? "1";
            string firstPageUrl = Link.ToAdminPhongTro();
            string pagerUrl = Link.ToAdminPhongTro("{0}");
            repProd.DataSource = PhongTro1.Paging(page, out howManyPages);
            repProd.DataBind();
            pagerTop.Show(int.Parse(page), howManyPages, firstPageUrl, pagerUrl, false);
            pagerBottom.Show(int.Parse(page), howManyPages, firstPageUrl, pagerUrl, true);

        }
    }
}
